<?php echo '';exit;?>
    <!--{eval}-->
    function klp_getspic($tid,$num,$type=''){
    	if($type == 'klp_cpicnums') {
    		return count(DB::fetch_all('SELECT tableid FROM '.DB::table('forum_attachment').' WHERE tid = '.$tid));
    	}
    	foreach (DB::fetch_all('SELECT tableid FROM '.DB::table('forum_attachment').' WHERE tid = '.$tid) as $klp_getpicinfo){
    		foreach ($getdata = DB::fetch_all('SELECT * FROM '.DB::table('forum_attachment_'.$klp_getpicinfo['tableid'].'').' WHERE tid = '.$tid . '  LIMIT  0 ,'.$num) as $klp_getspic){
    			
    			if($type == 'klp_cpicsomes'){
    				$klp_picarr[$klp_getspic['aid']] = getforumimg($klp_getspic['aid'],'0','300','300');
    			}else{
    				$klp_picarr[$klp_getspic['aid']] = getforumimg($klp_getspic['aid'],'0','160','160');
    			}
    		}
    		break;
    	}
    	return $klp_picarr;
    }
    require_once(DISCUZ_ROOT."./source/function/function_post.php");

	$filter = array( 'common' => '{lang have_posted}', 'save' => '{lang draft}', 'close' => '{lang closed}', 'aduit' => '{lang pending}', 'ignored' => '{lang ignored}', 'recyclebin' => '{lang recyclebin}');
	$_G[home_tpl_spacemenus][] = "<a href=\"home.php?mod=space&uid=$space[uid]&do=thread&view=me\">{lang they_thread}</a>";
 <!--{/eval}-->
<!--{eval $diymode = 1}-->
<!--{if $diymode}-->
<!--{template home/space_header}-->
<!--{template home/space_menu}-->
<div class="klp_conwrapr">
	<div class="klp_midsecwrap">
		<div class="klp_datumitembox">
<!--{else}-->
	<!--{template home/space_header}-->
	<style id="diy_style" type="text/css"></style>
	<div class="wp">
		<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
	</div>

<div class="klp_conarea">
	<div class="klp_conareaz">
		<!--{subtemplate home/space_my_nav}-->
	</div>

	<div class="klp_conyou cl">
		<!--[diy=diycontenttop]--><div id="diycontenttop" class="area"></div><!--[/diy]-->
		<div class="klp_bgboxradius">
			<div class="klp_midtitwrap border-bottom disnone">
				<h2 class="klp_midtitle">我的{lang thread}</h2>
			</div>
			<div class="klp_tabmenuinfo">
				<ul class="klp_sortshowwrap">
					<li>
						<span class="disnone">分类</span>
						<div class="klp_sortcon">
							<a href="home.php?mod=space&do=thread&view=we" $actives[we]>{lang friend_post}</a>
							<a href="home.php?mod=space&do=thread&view=me" $actives[me]>{lang my_post}</a>	
							<a href="javascript::;" class="klp_msortgj">高级搜索</a>
						</div>
					</li>
				</ul>
			</div>
		</div>
		    <script>  
    jQuery(function(){  
        jQuery('.klp_msortgj').click(function(){
            if(jQuery('.klp_mosort').is(':hidden')){
            jQuery('.klp_mosort').show(); 
			 jQuery(".klp_msortgj").addClass("klp_sorton"); 
            }else{
            jQuery('.klp_mosort').hide();
			 jQuery(".klp_msortgj").removeClass("klp_sorton"); 
            }  
        })  
    })  
    </script> 
<style type="text/css">
	.klp_sortcon a.klp_msortgj{ color: #ff9900; background: url(template/huyou_zisy/klp_img/klp_sorton.png) no-repeat right center; background-size:15px 15px;}
	.klp_sortcon a.klp_sorton{ background-image: url(template/huyou_zisy/klp_img/klp_sortoff.png); background-size:15px 15px;}
</style>
<div class="klp_bgboxradius">
	<div class="klp_datumitembox border-bottom">
<!--{/if}-->

		<!--{if !$diymode && $space[self]}-->
			<!--{if $_GET['view'] == 'me'}-->
			<p class="tbmu bw0 klp_mytie klp_mosort" style="display: none;">
				<!--{if $viewtype != 'postcomment'}-->
					<span class="y klp_mytie01">
						<span class="klp_mytie01a">
						<a href="home.php?mod=space&uid=$space[uid]&do=thread&view=me&type=$viewtype&from=$_GET[from]&filter=" {if !$_GET[filter]}class="a"{/if}>{lang all}</a>
						<!--{loop $filter $key $name}-->
						<a href="home.php?mod=space&do=thread&view=me&type=$viewtype&from=$_GET[from]&filter=$key" {if $key == $_GET[filter]}class="a"{/if}>$name</a>
						<!--{/loop}--> 
						</span>
						<select name="forumlist" id="forumlist" class="ps vm" onchange="viewforumthread(this.value);" style="width: 120px; word-wrap: normal;">
							<option value="0">{lang follow_select_forum}</option>
							$forumlist
						</select>
					</span>
				<!--{/if}-->
				<span class="klp_mytie02">
				<a href="home.php?mod=space&do=thread&view=me&type=thread" $orderactives[thread]>{lang topic}</a>
				<a href="home.php?mod=space&do=thread&view=me&type=reply" $orderactives[reply]>{lang reply}</a>
				<a href="home.php?mod=space&do=thread&view=me&type=postcomment" $orderactives[postcomment]>{lang post_comment}</a>
				</span>
				<!--{if $viewtype != 'reply' && $viewtype != 'postcomment'}--><span class="klp_mytie03"> <input type="text" id="searchmypost" class="px vm" size="15" /> <button class="pn vm" onclick="searchpostbyusername($('searchmypost').value, '$_G[username]');"><em>{lang search}</em></button></span><!--{/if}-->
			</p>
			<!--{elseif $_GET['view'] == 'all'}-->
			<p class="tbmu bw0">
				<a href="home.php?mod=space&do=thread&view=all&order=dateline" $orderactives[dateline]>{lang newest_thread}</a><span class="pipe">|</span>
				<a href="home.php?mod=space&do=thread&view=all&order=hot" $orderactives[hot]>{lang top_thread}</a>
			</p>
			<!--{/if}-->
		<!--{/if}-->
		
		<!--{if $diymode && !$_G[setting][homepagestyle] }-->
			<p class="tbmu">
				<a href="home.php?mod=space&uid=$space[uid]&do=thread&view=me&from=space&type=thread" $orderactives[thread]>{lang topic}</a>
				<span class="pipe">|</span>
				<a href="home.php?mod=space&uid=$space[uid]&do=thread&view=me&from=space&type=reply" $orderactives[reply]>{lang reply}</a>
			</p>
		<!--{/if}-->
		
		<!--{if $userlist}-->
			<p class="tbmu bw0">
				{lang view_by_friend}
				<select name="fuidsel" onchange="fuidgoto(this.value);" class="ps">
					<option value="">{lang all_friends}</option>
					<!--{loop $userlist $value}-->
					<option value="$value[fuid]"{$fuid_actives[$value[fuid]]}>$value[fusername]</option>
					<!--{/loop}-->
				</select>
			</p>
		<!--{/if}-->
		<div class="tl klp_theadtl klp_con">
			<form method="post" autocomplete="off" name="delform" id="delform" action="home.php?mod=space&do=thread&view=all&order=dateline" onsubmit="showDialog('{lang del_select_thread_confirm}', 'confirm', '', '$(\'delform\').submit();'); return false;">
					<input type="hidden" name="formhash" value="{FORMHASH}" />
					<input type="hidden" name="delthread" value="true" />
					 <div class="threadlist cl klp_tilists">
						<ul id="mothreadlisttableid">                
					<!--{if $list}-->
						<!--{loop $list $stid $thread}-->

							<!--{if $thread['displayorder'] > 0 && !$displayorder_thread}-->
								{eval $displayorder_thread = 1;}
							<!--{/if}-->
							
							<!--{if $thread['moved']}-->
								<!--{eval $thread[tid]=$thread[closed];}-->
							<!--{/if}-->
							
							<!--{eval $klp_cpicnums = klp_getspic($thread[tid],1,'klp_cpicnums');}-->


							<li id="mo_$thread[id]"{if $_G['hiddenexists'] && $thread['hidden']} style='display:none'{/if}>
								<a class="klp_imglistm" href="forum.php?mod=viewthread&tid=$thread[tid]&extra=$extra">

								<div class="klp_thlisthead">
										<div class="klp_ftou"><!--{avatar($thread[authorid],small)}--></div>
										<h4>
											<div class="count y">
												<span class="chakan icon"><!--{if $thread['isgroup'] != 1}-->$thread[views]<!--{else}-->{$groupnames[$thread[tid]][views]}<!--{/if}--></span>
												<span class="huifu icon">{$thread[replies]}</span>
											</div>
											<span class="th_zuozhe">$thread[author]</span>   发布于 $thread[dateline]
										</h4>

									</div>
									<!--{if $klp_cpicnums !== 1}-->

									<h3 class="klp_listtitle">
										<!--{if $thread['special'] == 1}-->
											<span class="threadType">{lang thread_poll}</span>
										<!--{elseif $thread['special'] == 2}-->
											<span class="threadType">{lang thread_trade}</span>
										<!--{elseif $thread['special'] == 3}-->
											<span class="threadType">{lang thread_reward}</span>
										<!--{elseif $thread['special'] == 4}-->
											<span class="threadType">{lang thread_activity}</span>
										<!--{elseif $thread['special'] == 5}-->
											<span class="threadType">{lang thread_debate}</span>
										<!--{elseif in_array($thread['displayorder'], array(1, 2, 3, 4))}-->
											<span class="jinghuatie">顶</span>
										<!--{elseif $thread['digest'] > 0}-->
											<span class="jinghuatie">精</span>
										<!--{/if}-->
										<span  $thread[highlight]>{$thread[subject]}</span>
									</h3>
									<!--{/if}-->
									<!--{if $klp_cpicnums >= 2}-->
										<!--{eval $width=$klp_cpicnums==2?'300':'200';}-->
										<!--{eval $height=$klp_cpicnums==2?'180':'200';}-->
										<div class="klp_imglistsome <!--{if $klp_cpicnums == 2}-->twopic<!--{/if}--> mt20  cl">
											<ul class="cl">
												{eval $klp_cpicsomes=klp_getspic($thread[tid],3,'klp_cpicsomes');}
												{eval $i=1;} 
												<!--{loop $klp_cpicsomes $key}-->                        
												<li><span><img src="$key" ></span></li>
												{eval $i++;} 
												<!--{/loop}-->
											</ul>
										</div>

									<!--{elseif $klp_cpicnums == 1}-->
										<div class="klp_imglistonly cl">
											<div class="klp_nei">
												<h3 class="klp_listtitle">
													<!--{if $thread['special'] == 1}-->
														<span class="threadType">{lang thread_poll}</span>
													<!--{elseif $thread['special'] == 2}-->
														<span class="threadType">{lang thread_trade}</span>
													<!--{elseif $thread['special'] == 3}-->
														<span class="threadType">{lang thread_reward}</span>
													<!--{elseif $thread['special'] == 4}-->
														<span class="threadType">{lang thread_activity}</span>
													<!--{elseif $thread['special'] == 5}-->
														<span class="threadType">{lang thread_debate}</span>
													<!--{elseif in_array($thread['displayorder'], array(1, 2, 3, 4))}-->
														<span class="jinghuatie">顶</span>
													<!--{elseif $thread['digest'] > 0}-->
														<span class="jinghuatie">精</span>
													<!--{/if}-->
													<span  $thread[highlight]>{$thread[subject]}</span>
												</h3>


											</div>
											<div class="klp_imgonlym">
												{eval $klp_cpicsomes=klp_getspic($thread[tid],1,'klp_cpicsomes');}
												<img src="{echo current($klp_cpicsomes)}" />
											</div>

										</div>

									<!--{/if}-->
										   <div class="klp_clear"></div>
										   <div class="cl klp_msstie"><p><!--{echo messagecutstr(DB::result_first('SELECT `message` FROM '.DB::table('forum_post').' WHERE `tid` ='.$thread[tid].' AND `first` =1'),99)}--></p></div>
								</a>
							</li>
						<!--{/loop}-->
					<!--{else}-->
						<li class="hasnone">该用户还没有发布任何主题</li>
					<!--{/if}-->
					</ul>
			 </div>

					<!--{if $_GET['view'] == 'all' && $pruneperm && !$_GET['archiveid'] && $list}-->
						<p class="mtm pns">
							<label for="chkall" onclick="checkall(this.form, 'moderate')"><input type="checkbox" name="chkall" id="chkall" class="pc vm" />{lang select_all}</label>
							<button type="submit" name="delsubmit" value="true" class="pn vm"><em>{lang del_select_thread}</em></button>
						</p>
					<!--{/if}-->
				</form>
				<!--{if $hiddennum}-->
					<p class="mtm">{lang hide_thread}</p>
				<!--{/if}-->
			</div>
			<!--{if $multi}--><div class="pgs cl mtm">$multi</div><!--{/if}-->		
		
		<script type="text/javascript">
		function fuidgoto(fuid) {
			window.location.href = 'home.php?mod=space&do=thread&view=we&fuid='+fuid;
		}
		function viewforumthread(fid) {
			window.location.href = '{$forumurl}&fid='+fid;
		}
		</script>
		
		<!--{if !$_G[setting][homepagestyle]}--><!--[diy=diycontentbottom]--><div id="diycontentbottom" class="area"></div><!--[/diy]--><!--{/if}-->

		<!--{if $diymode}-->

		</div>
	</div>
</div>
		<!--{else}-->

		</div>
	</div>

		</div>
	</div>
		<!--{/if}-->


<!--{if !$_G[setting][homepagestyle]}-->
	<div class="wp mtn">
		<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
	</div>
<!--{/if}-->

<!--{template home/space_footer}-->